package io.geekidea.springbootplus.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.geekidea.springbootplus.system.entity.Advertise;
import io.geekidea.springbootplus.system.param.AdvertisePageParam;
import io.geekidea.springbootplus.system.param.AdvertiseStatusParam;
import io.geekidea.springbootplus.system.vo.AdvertiseQueryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdvertiseMapper extends BaseMapper<Advertise> {

    /**
     *  添加轮播图
     * @param sysAdvertise 轮播图对象
     * @return
     */
    Integer insertSysAdvertise(AdvertiseQueryVo sysAdvertise);

    /**修改轮播图
     *
     * @param sysAdvertise 轮播图对象
     * @return
     */
    Integer updateSysAdvertise(AdvertiseQueryVo sysAdvertise);

    /**
     *  删除单个轮播图
     * @param id 主键
     * @return
     */
    Integer deleteSysAdvertiseById(Integer id);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    Integer  deleteAllAdvertise(List<Integer> ids);


    AdvertiseQueryVo slectAdvertiseById(Integer id);

    /**
     *
     * @param advertisePageParam
     * @return
     */

    IPage<AdvertiseQueryVo> getSysAdvertisePageList(@Param("page") Page page, @Param("param") AdvertisePageParam advertisePageParam);

    /**商品上下架
     * @return
     */
    Integer updateAdvertiseStatus(@Param("param") AdvertiseStatusParam advertiseStatusParam);
}
